<template>
  <div class="item">
<!--    背景图-->
    <div>
      <img src="/background.jpg" alt="">
    </div>
    <div>
      <div>
        {{note}}
      </div>
      <span>2020-1-1</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "GoodsItem",
  props:{
    note: {
      type: String,
      default: ''
    }
  }
}
</script>

<style scoped>
.item {
  display: flex;
  /*主轴方向设置为纵向*/
  flex-direction: column;
  overflow: hidden;
  width: 30%;
  height: 230px;
  box-shadow: 0 0 15px rgba(0, 0, 0, .3);
  border-radius: 5px;
  background-color: #fff;
}

.item > div:first-child {
  flex: 4;
  overflow: hidden;
}

.item > div:last-child {
  flex: 1;
  padding: 0 5px;
}
.item > div:last-child span{
  float: right;
  font-size: 13px;
}
.item > div img {
  width: 100%;
}
</style>